package com.tyk.bookstore.front.payment.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tyk.bookstore.front.common.core.model.enume.PaymentWay;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * @author tyk
 * @description 支付记录
 */
@Schema(name = "PaymentRecordDo", description = "支付记录")
@Data
@TableName("payment_record")
public class PaymentRecordDo  implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "ID")
    @TableId(value = "id")
    private Long id;

    @Schema(description = "支付流水号")
    @TableField("trade_no")
    private String tradeNo;

    @Schema(description = "订单ID")
    @TableField("order_id")
    private Long orderId;

    @Schema(description = "支付金额")
    @TableField("amount")
    private BigDecimal amount;

    @Schema(description = "会员ID")
    @TableField("member_id")
    private Long memberId;

    @Schema(description = "第三方流水号")
    @TableField("out_trade_no")
    private String outTradeNo;

    @Schema(description = "支付方式")
    @TableField("payment_way")
    private PaymentWay paymentWay;

    @Schema(description = "支付时间")
    @TableField("payment_time")
    private LocalDateTime paymentTime;
}
